package com.meida.boot.handler;

import com.meida.common.mybatis.entity.EntityMap;
import com.meida.common.mybatis.interceptor.PageInterceptor;
import com.meida.common.mybatis.model.PageParams;
import com.meida.common.mybatis.query.CriteriaQuery;
import com.meida.common.security.OpenHelper;
import com.meida.module.order.client.entity.OrderInfo;
import com.meida.module.pay.client.entity.PayInfo;
import com.meida.module.system.client.entity.SysVip;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 * 会员充值订单列表处理器
 *
 * @author Administrator
 */
@Component("vipOrderListHandler")
@Log4j2
public class VipOrderListHandler implements PageInterceptor<OrderInfo> {


    @Override
    public void prepare(CriteriaQuery<OrderInfo> cq, PageParams pageParams, EntityMap params) {
        Long companyId = OpenHelper.getCompanyId();
        cq.eq(PayInfo.class, "companyId", companyId);
    }

}
